The SELECT element is used for single and multiple choice menus. It is generally rendered as a drop-down or pop-up menu, and offers a more compact alternative to using radio buttons for single choice menus, or checkboxes for multiple choice menus.
ID
An SGML identifier used as the target for hypertext links or for naming particular elements in
associated style sheets. Identifiers are NAME tokens and must be unique within the scope of the current
document.
LANG
This is one of the ISO standard language abbreviations, e.g. "en.uk" for the variety of
English spoken in the United Kingdom. It can be used by parsers to select language specific choices for
quotation marks, ligatures and hyphenation rules. The language attribute is composed from the two letter
language code from ISO 639, optionally followed by a period and a two letter country code from ISO
3166.
CLASS
This a space separated list of SGML NAME tokens and is used to subclass tag names. By
convention, class names are interpreted hierarchically, with the most general class on the left and the most
specific on the right, where classes are separated by a period. The CLASS attribute is most commonly used
to attach a different style to some element, but it is recommended that where practical class names should be
picked on the basis of the element's semantics, because this permitsother uses, such as restricting search
through documents by matching on element class names. The conventions for choosing class names are
outside the scope of this document.
NAME
The formal name of the menu which is used in the form's contents list.
MULTIPLE
The presence of this attribute denotes that the SELECT element defines a multiple choice menu. In
its absence, the element defines a single choice menu.
DISABLED
When present, the menu should be rendered as normal, but can't be modified by the user. Where
practical the rendering should provide a cue that the menu is disabled e.g. by graying out the text, changing
the color of the background or similar.
ERROR
This attribute specifies an error message explaining why the menu's current selections are incorrect.
Further error messages can be attached to individual options. When this attribute is missing, the menu can be
assumed to be ok. User agents are recommended to provide a cue to indicate that the menu is in error.
SRC (Source)
The SRC attribute is used for graphical menus to specify the URI for the image. Its syntax is the
same as that of the HREF attribute of the <A> tag.
MD
Specifies a message digest or cryptographic checksum for the associated image specified by the
SRC attribute. It is used when you want to be sure that the image is indeed the same one that the author
intended, and hasn't been modified in any way. For instance,
MD="md5:jV2OfH+nnXHU8bnkPAad/mSQlTDZ" specifies an MD5 checksum encoded as a
base64 character string. The MD attribute is generally allowed for all elements which support URI based
links.
WIDTH
Optional suggested width for the image. By default, this is given in pixels.
HEIGHT
Optional suggested height for the image. By default, this is given in pixels.
UNITS
This optional attribute specifies the units for the width and height attributes. It is one of:
units=pixels (the default) or units=em (the width of the letter "m") which scales with the font
size.
ALIGN
Take values TOP or MIDDLE or BOTTOM, defining whether the top or middle or bottom of the
graphic should be aligned with the baseline for the text line in which the IMG element appears.
With ALIGN=LEFT, the graphic will float down and over to the current left margin, and
subsequent text will wrap around the right hand side of the graphic. Likewise for ALIGN=RIGHT, the
graphic aligns with the current right margin and, and text wraps around the left.
<SELECT> is legal within:
<FORM>
The following markup can be used within <SELECT>
<OPTION>
Please see the Fill In Forms tutorial for examples.